#include <stdio.h>

int main(void)
{
	int i = 1;
	double item, sum = 0;

	while ((item = 1.0 / i) >= 1.0e-5)
	{
		sum += item;
		i++;
	}
	printf("sum = %f\n", sum);

	return 0;
}